The user selected some entries in a lister and then hit the copy button.
1 when event = 'Copy' then do
2 lister query handle selentries
3 allents = result
4 call getall
5 if handle = thishandle then do
6 otherhandle = user
7 call arcextract
8 end
9 else do
10 otherhandle = handle
11 handle = user
12 call arcadd
13 end
14 end
Line:
1 It's a Copy event so let's do it.
2 - 4 We ask for a list of all selected entries storing the result in
allents, then call the getall routine to separate the list into
separate names and types.
5 - 8 If the handle given in the packet matches the handle for our ArcDir
lister, then we are copying from the ArcDir lister to the other one,
(extracting entries from the archive), so we set otherhandle to the
handle for the other lister and call the arcextract routine.
9 - 13 Otherwise, we're copying to the ArcDir lister, (adding entries to the
archive), so we make otherhandle equal to the other lister's
handle, handle equal to the ArcDir handle and call the arcadd
routine.
14 End of the When loop.
|